// FoldersPage.h
 
#ifndef __FOLDERS_PAGE_H
#define __FOLDERS_PAGE_H

#include "Common/App/AppRegistry.h"

class CFoldersPage : public CPropertyPageImpl<CFoldersPage>
{
	typedef CPropertyPageImpl<CFoldersPage> baseClass;
public:
	enum { IDD = IDD_FOLDERS};

	BEGIN_MSG_MAP(CMenuPage)
		MSG_WM_INITDIALOG(OnInitDialog)
		COMMAND_ID_HANDLER(IDC_FOLDERS_WORK_EDIT_PATH, OnEditChange)
		COMMAND_ID_HANDLER(IDC_FOLDERS_WORK_CHECK_FOR_REMOVABLE, OnChange)
		COMMAND_ID_HANDLER(IDC_FOLDERS_WORK_BUTTON_PATH, OnFoldersWorkButtonPath)		
		COMMAND_RANGE_HANDLER(IDC_FOLDERS_WORK_RADIO_SYSTEM, IDC_FOLDERS_WORK_RADIO_SPECIFIED, OnChangeWorkModeButtons)
		CHAIN_MSG_MAP(CPropertyPageImpl<CFoldersPage>)
	END_MSG_MAP()

	BOOL OnInitDialog(CWindow wndFocus, LPARAM lInitParam);
	LRESULT OnChange(WORD wNotifyCode, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
	LRESULT OnEditChange(WORD wNotifyCode, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
	LRESULT OnFoldersWorkButtonPath(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
	LRESULT OnChangeWorkModeButtons(WORD wNotifyCode, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/);

	void OnHelp();
    int OnApply();
	
private:

  Common::Archive::WorkDir::CInfo m_WorkDirInfo;

  void MyEnableControls();
  void ModifiedEvent();
  CWindow m_WorkPath;
  CWindow m_ButtonSetWorkPath;  
  int GetWorkMode() const;
  void GetWorkDir(Common::Archive::WorkDir::CInfo &workDirInfo);
  
  
};

#endif
